This invention relates generally to data compression and more particularly to a deterministic method and system for verifying synchronization words.
Some sounds cannot be perceived as accurately by the human ear as other sounds, and some sounds cannot be perceived by the human ear at all. Therefore, a digital representation of an audio signal may be compressed by taking advantage of these properties of the human ear and allocating more bits of data to represent the sounds that a human ear can more readily perceive and less bits of data to represent the sounds that a human ear can less readily perceive. A standard digital audio encoded signal format has been set forth by the Motion Picture Experts Group for this type of compression. This format is commonly referred to as xe2x80x9cMPEG Audio.xe2x80x9d
In a typical compression, the data is divided by an encoder into a number of segments called frames. The encoder also adds overhead data to the beginning of each frame that provides information about the audio data in that frame, such as identification, layer, protection, bit rate, etc. The overhead data generally begins with a synchronization word (syncword) as a signal to a decoder that a new frame is beginning. The decoder searches for a syncword from which to begin decoding during the initial decoding process, or when recovering from an error or switching channels.
Conventional techniques used to find and verify the validity of possible syncwords generally rely on an extended buffer to store a large section of a data stream. This stored section of the data stream is searched for possible syncwords and used to verify the validity of those possible syncwords. This reliance on an extended buffer is a problem because extended buffers are more costly and on-chip memories in general are relatively small.
In accordance with the present invention, a deterministic method and system for verifying synchronization words (syncwords) are provided that substantially eliminate or reduce disadvantages and problems associated with previously developed systems and methods. In particular, the present invention eliminates the need to store large sections of a data stream in order to verify the validity of a potential syncword, allowing the use of relatively small buffers.
In one embodiment of the present invention, a data file having a plurality of frames is received, each frame having a syncword. A data string including at least one potential syncword is identified in the data file. A subsequent potential syncword address for the potential syncword is determined. A pointer address corresponding to a potential syncword following the data string in the data file is identified. The pointer address is compared to the subsequent potential syncword address. The data file is decoded based on the potential syncword following the data string in response to the pointer address corresponding to the subsequent potential syncword address.
Technical advantages of the present invention include providing an improved method and system for verifying syncwords. In particular, potential syncwords are efficiently verified using only a small buffer. Accordingly, reliance on more costly, extended buffers is avoided and relatively small buffers, such as those provided by on-chip memories, may be used instead.
Other technical advantages will be readily apparent to one skilled in the art from the following figures, description, and claims.